Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update docs and readme #62

Merged
merged 2 commits into from
Sep 2, 2024
Merged

docs: update docs and readme #62

merged 2 commits into from
Sep 2, 2024

Conversation

0xnigir1
Copy link
Collaborator

🤖 Linear

Closes ZKS-150

Description

Add docs and README files for packages

@0xnigir1 0xnigir1 requested review from 0xkenj1 and 0xyaco August 30, 2024 18:59
Copy link

linear bot commented Aug 30, 2024

ZKS-150 Documentation

Copy link
Collaborator

@0xyaco 0xyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super neat docs!

Comment on lines 35 to 48
- (optional) `PORT` on which API is made available. By default is port 3000
- (optional) `ENVIRONMENT` which environment we are using ( 'mainnet' | 'testnet' | 'local'). By default is 'mainnet'
- `BRIDGE_HUB_ADDRESS`
- `SHARED_BRIDGE_ADDRESS`
- `STATE_MANAGER_ADDRESSES` CSV list of State managers addresses
- `L1_RPC_URLS` as CSV list of RPC URLs. For example, `https://eth.llamarpc.com,https://rpc.flashbots.net/fast`. You can check [Chainlist](https://chainlist.org/) for a list of public RPCs
- (optional) `PRICING_SOURCE` which pricing source to use ('dummy' | 'coingecko'). By default is dummy
- (optional) `DUMMY_PRICE` for dummy pricing source. Default is undefined
- (required if 'coingecko' is selected)`COINGECKO_API_KEY`, `COINGECKO_BASE_URL` and `COINGECKO_API_KEY` depending on your API plan. You can get an API Key creating an account on [Coingecko's site](https://www.coingecko.com/en/api)
- `METADATA_SOURCE` which metadata source to use ('github' | 'local' | 'static')
- (required if METADATA_SOURCE is 'github') `METADATA_TOKEN_URL` Metadata tokens URL
- (required if METADATA_SOURCE is 'github') `METADATA_CHAIN_URL` Metadata chains URL
- (required if METADATA_SOURCE is 'local') `METADATA_TOKEN_JSON_PATH` Metadata tokens JSON file path (see examples on `packages/metadata`)
- (required if METADATA_SOURCE is 'local') `METADATA_CHAIN_JSON_PATH` Metadata chain JSON file path (see examples on `packages/metadata`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going the extra extra mile but, what do you think about using a Markdown table for this part? You can use this tool to generate your tables in an easier way

Eg

Name Description Default Notes
PORT Port on which API is made available. "3000"
ENVIRONMENT Environment used ('mainnet' | 'testnet' | 'local') "mainnet"
BRIDGE_HUB_ADDRESS
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 🫶


1. To create a new provider, create it inside [`providers`](./src/providers/) folder and implement the [`IPricingProvider`](./src/interfaces/pricing.interface.ts) interface.

> Note 1: is provider implementation responsibility to map token addresses to their internal id if needed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me some seconds to understand this phrase at first, wdyt about these small changes?

Suggested change
> Note 1: is provider implementation responsibility to map token addresses to their internal id if needed.
> Note 1: it is the provider's responsibility to map token addresses to their internal id if needed.

@0xnigir1 0xnigir1 requested a review from 0xyaco August 30, 2024 20:17
Copy link
Collaborator

@0xyaco 0xyaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 🔥

Copy link
Collaborator

@0xkenj1 0xkenj1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@0xnigir1 0xnigir1 merged commit adf8217 into dev Sep 2, 2024
6 checks passed
@0xnigir1 0xnigir1 deleted the docs/add-docs branch September 2, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants